﻿
$(document).on("click", ".sh_zt", function (e) {
    tgsh($(e.target))
})

function GET_YDxx() {
    $.ajax({
        url: '/Freight/SH',
        type: 'GET',
        data: { "state": 1},
        success: function (data) {
            createRow_YD(data)
        },
        error: function () {
            alert('Request Error');
        }
    })
}

function createRow_YD(data) {
    $("#yundan_xx tr").remove()
    var index=1
    $.each(data, function (i, item) {
        $("#yundan_xx").append(
            $(`
                    <tr>
                            <td style="display:none">${item.yd_id}</th>
                            <td>${index}</th>
                            <td id="fhdh">${item.yd_fhdh}</th>
                            <td id="kh">${item.yd_kh}</th>
                            <td id="dz">${item.yd_shdz}</th>
                            <td id="wl">${item.yd_hw}</th>
                            <td id="cjrq">${item.yd_cjrq}</th>
                            <td id="shdh">${item.yd_shdh}</th>
                            <td>${item.yd_cydw}</th>
                            <td id="cc">${item.yd_cc}</th>
                            <td id="jl">${item.yd_gls}</th>
                            <td id="jg">${item.yd_yf}</th>
                            <td id="cph">${item.yd_yf}</th>
                            <td><a href="#" class="sh_zt">通过</a>/<a href="#" class="sh_zt">不通过</a></td>
                        </tr>
            `)
            )
    })
}

function tgsh(e) {
    var zhuang = e.val()
    var id = e.parent().parent().chi
    
}